package com.joysuch.wwyt.workflow.entity;

import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.time.LocalDateTime;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * @Author ZhangDong
 * @Date 2020/11/4 15:22
 */

@Data
@Entity
@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Table(name = "WWYT_WORKFLOW_LOCATION_CONFIG")
@SQLDelete(sql = "update WWYT_WORKFLOW_LOCATION_CONFIG set DELETE_FLAG = '1' where id= ?")
@SQLDeleteAll(sql = "update WWYT_WORKFLOW_LOCATION_CONFIG set DELETE_FLAG = '1' where id= ?")
@Where(clause = "DELETE_FLAG = '0'")
public class WorkFlowLocationConfig {

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @ApiModelProperty("主键ID")
    private Long id;
    @ApiModelProperty("流程节点ID")
    private Long processId;
    @ApiModelProperty("定位方式")
    private String locationWay;
    @ApiModelProperty("标记方式")
    private String markWay;
    @ApiModelProperty("组件名称")
    private String componentName;
    @ApiModelProperty("组件键名")
    private String componentKeyName;
    @ApiModelProperty("显示时效")
    private String showTimeType;
    @ApiModelProperty("开始时间--关联时间组件")
    private String startTimeKey;
    @ApiModelProperty("结束时间--关联时间组件")
    private String endTimeKey;
    @ApiModelProperty("流程节点集合")
    private String flowNode;
    @ApiModelProperty("地图上显示名称")
    private String mapShowName;
    @ApiModelProperty("图标类型")
    private String iconType;
    @ApiModelProperty("上传图标--存图片")
    private String iconUpload;
    @ApiModelProperty("设为可视化大屏专栏")
    private boolean screenColumnOpen;
    @ApiModelProperty("启用电子围栏报警事件")
    private boolean railAlarmOpen;
    @ApiModelProperty("风险区域组件key")
    private String riskAreaKey;

    @ApiModelProperty("是否启用地图快照 0否 1是")
    private Integer snapshotOpen;

    @ApiModelProperty("是否启用电子签名  0否 1是")
    private Integer signatureOpen;

    @org.springframework.data.annotation.CreatedBy
    @ApiModelProperty("创建人")
    private Long createBy;
    @org.springframework.data.annotation.CreatedDate
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;
    @org.springframework.data.annotation.LastModifiedBy
    @ApiModelProperty("更新人")
    private Long updateBy;
    @org.springframework.data.annotation.LastModifiedDate
    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
    @ApiModelProperty("租户")
    private Long tenentId;
    @ApiModelProperty("组织机构代码")
    private String orgCode;
    @ApiModelProperty("删除标记")
    private String deleteFlag;

}
